﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IDAL;
using DALFactory;
using Common;

namespace BLL {
    public class User {

        IUser user = DataAccess.CreateUser();
        public bool Login(string userName,string userPassword) {
            return user.Login(userName, MD5Provider.Hash(userPassword));
        }
        public bool Update(Model.User model) {
            model.Password = MD5Provider.Hash(model.Password);
            return user.Update(model);
        }
    }
}
